<div class="layui-header">
    <a href="javascript:void(0)" class="layui-logo layui-elip">LarAdmin</a>
    <ul class="layui-nav layui-layout-left">
        @foreach($module as $item)
            <li class="layui-nav-item  {{ isset($default_module) && $default_module == $item['rule'] ? " layui-this":"" }}">
                <a href="{{ $item['default_path'] }}"><span>{{ $item['name'] }}</span></a>
            </li>
        @endforeach
    </ul>

    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item">
            <dl class="layui-nav-child">
                <dd lay-unselect>
                    <a href="javascript:void(0)" onclick="modifyPassword()">
                        <i class="layui-icon layui-icon-component margin-right-5"></i>{{ trans('common.modify_password') }}
                    </a>
                </dd>
                <dd lay-unselect>
                    <a href="{{ url("logout") }}">
                        <i class="layui-icon layui-icon-release margin-right-5"></i>{{ trans('common.logout') }}
                    </a>
                </dd>
            </dl>
            <a><span><i class="layui-icon layui-icon-username margin-right-5"></i>{{ session('userinfo.loginname') }}</span></a>
        </li>
    </ul>
</div>

<script type="text/javascript">
    function modifyPassword() {
        layer.open({
            type: 2,
            title: '{{ trans('common.modify_password') }}',
            area: ['600px', '450px'],
            content: '{{ url('user/modpass') }}'
        });
    }
</script>
